/**
 * 模型对比视图样式
 */

.comparison-view {
  padding: 16px;
  background: #f5f5f5;
  min-height: 400px;
}

.comparison-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  background: white;
  border-radius: 8px;
}

.comparison-card {
  height: 100%;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.comparison-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.comparison-card.selected {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-icon {
  font-size: 18px;
  color: #1890ff;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-text {
  font-size: 12px;
  color: #8c8c8c;
  text-transform: capitalize;
}

.metrics {
  display: flex;
  gap: 12px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #595959;
}

.metric .anticon {
  font-size: 14px;
}

.card-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 12px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

/* 自定义滚动条 */
.card-content::-webkit-scrollbar {
  width: 6px;
}

.card-content::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb {
  background: #bfbfbf;
  border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb:hover {
  background: #8c8c8c;
}

.content-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: #262626;
}

/* 差异高亮样式 */
.diff-content {
  position: relative;
}

.diff-added {
  background-color: #d4f4dd;
  color: #1a7f37;
  padding: 2px 4px;
  border-radius: 2px;
  margin: 0 2px;
  font-weight: 500;
}

.diff-removed {
  background-color: #ffd8d3;
  color: #cf222e;
  padding: 2px 4px;
  border-radius: 2px;
  margin: 0 2px;
  text-decoration: line-through;
  opacity: 0.7;
}

/* 状态样式 */
.generating {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #1890ff;
}

.pending {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #8c8c8c;
}

.pending .anticon {
  font-size: 32px;
  margin-bottom: 12px;
}

.error-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #f5222d;
}

.error-content .anticon {
  font-size: 32px;
  margin-bottom: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .comparison-view {
    padding: 8px;
  }
  
  .comparison-card {
    margin-bottom: 12px;
  }
  
  .card-content {
    max-height: 300px;
  }
  
  .metrics {
    flex-direction: column;
    gap: 4px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .comparison-view {
    background: #141414;
  }
  
  .comparison-card {
    background: #1f1f1f;
  }
  
  .card-content {
    background: #262626;
  }
  
  .content-text {
    color: #e6e6e6;
  }
  
  .diff-added {
    background-color: #1a3a1f;
    color: #4ade80;
  }
  
  .diff-removed {
    background-color: #3a1a1a;
    color: #f87171;
  }
}